package com.hbnu.array;

import java.util.Scanner;

public class DemoArray11 {
    public static void main(String[] args) {
        //乔瑟夫环
        //n人,k开始数,m出列
        Scanner reader = new Scanner(System.in);
        int n_in = reader.nextInt();
        int[] list_all = new int[n_in];
        for (int i = 0; i < list_all.length; i++) {
            list_all[i] = i+1;
        }
        int target = n_in;
        int k_in = reader.nextInt();
        int m_in = reader.nextInt();
        int i_k = k_in-1;
        int cnt = 0;
        while(target>1){
            if(i_k >= list_all.length){
                i_k = 0;
            }
            if(list_all[i_k]>0){
                cnt++;
            }
            if(cnt==m_in){
                cnt = 0;
                System.out.println(list_all[i_k]+"out");
                list_all[i_k] = -1;
                target--;
            }
            i_k++;
        }
        for (int i = 0; i < list_all.length; i++) {
            if(list_all[i]>0){
                System.out.println(list_all[i]+"live");
            }
        }
    }
}
